// 此为获取 应设置layui数据表格的高度，将上下表格设置为iframe高度的一半
var body_height = $(document.body).outerHeight();
var layui_table_view__height = body_height / 2;

//多文件上传
var file_number = 0;//（多文件上传）存放已经总共上传多少文件
var success_upload_file_number = 0;//（多文件上传）存放已经成功上传多少文件
var mul_index = null;//存放多文件上传的弹出层index



var current_fileNumber = "";//存放当前的档号（为上表格编辑按钮准备）


// 上传excel ,其函数所需要的变量
var key_file_1;
// var key_file_1_1 = ["档号", "全宗名称", "文件题名", "分类名称", "档案类别",
//     "保管期限代码", "密级", "组织机构", "备注", "存放位置", "登记号",
//     "载体数量", "全宗号", "案卷号", "盒号", "附件", "问题", "保管期限", "分类号"];
// var key_file_1_2 = ["档号", "年度", "文件题名","件号","文号","日期","责任人","页数", "备注", "全宗号" ,"保管期限"];


// var key_file_1_1 = ["档号","档案馆代码", "正题名", "档案号", "证字号", "男性别",
//     "男姓名", "男身份证号", "男出生日期", "男方原婚姻状态", "男方住址或单位", "男方证件类型",
//     "男方身份类型", "男方国籍", "男方民族", "男方常住户口所在地", "男方证件印制号", "女性别", "女姓名", "女身份证号",
//     "女出生日期","女方原婚姻状态","女方住址或单位","女方证件类型","女方身份类型","女方国籍","女方民族","女方常住户口所在地",
//     "女方证件印制号","登记机关","原登记机关","登记性质","原登记日期","承办机关","登记员姓名","是否删除",
//     "结婚证备注","原结婚登记日期","原文标识","其他备注","ID","业务类型","全宗号","案卷号",
//     "盒号","主题词","保管期限","附注","年度","分类","实体存放地址","文件页数"];

var key_file_1_1 = ["全宗号","年度","档案馆代码","正题名","档号","ID","业务类型","男性别","男姓名","男身份证号","男出生日期","男方国籍","男方民族","男方常住户口所在地",
    "男方证件类型","男方身份类型","男方证件印制号","女姓名","女性别","女身份证号","女出生日期","登记日期","登记机关","女方证件类型","女方身份类型","女方国籍","女方民族","女方常住户口所在地",
    "女方证件印制号","承办机关","原结婚登记日期","结婚日期","登记员姓名","是否删除","离婚证备注","结婚证备注","原登记机关","档案号","证字号","其他备注","男方结婚类型","女方结婚类型",
    "男方原婚姻状态","女方原婚姻状态","原登记日期"];


var key_file_1_2 = ["全宗号","年度","档案馆代码","正题名","档号","ID","业务类型","男性别","男姓名","男身份证号","男出生日期","男方国籍","男方民族","男方常住户口所在地",
    "男方证件类型","男方身份类型","男方证件印制号","女姓名","女性别","女身份证号","女出生日期","登记日期","登记机关","女方证件类型","女方身份类型","女方国籍","女方民族","女方常住户口所在地",
    "女方证件印制号","承办机关","原结婚登记日期","结婚日期","登记员姓名","是否删除","离婚证备注","结婚证备注","原登记机关","档案号","证字号","其他备注","男方结婚类型","女方结婚类型",
    "男方原婚姻状态","女方原婚姻状态","原登记日期"];



//
// var key_file_2 = ["文件级档号", "分类名称", "档案类别", "全宗名称", "保管期限代码",
//     "密级", "文件题名", "组织机构", "备注", "全宗号", "案卷号", "责任者", "附件", "张页号",
//     "问题", "保管期限", "附注", "卷内顺序号", "分类号", "成文日期", "档号"];


// var key_file_2 = ["档案馆代码", "正题名", "档案号", "证字号", "男性别",
//     "男姓名", "男身份证号", "男出生日期", "男方原婚姻状态", "男方住址或单位", "男方证件类型",
//     "男方身份类型", "男方国籍", "男方民族", "男方常住户口所在地", "男方证件印制号", "女性别", "女姓名", "女身份证号",
//     "女出生日期","女方原婚姻状态","女方住址或单位","女方证件类型","女方身份类型","女方国籍","女方民族","女方常住户口所在地",
//     "女方证件印制号","登记机关","原登记机关","登记性质","原登记日期","承办机关","登记员姓名","是否删除",
//     "结婚证备注","原结婚登记日期","原文标识","其他备注","ID","业务类型","全宗号","案卷号",
//     "盒号","主题词","保管期限","附注","年度","分类","实体存放地址","文件页数"];

var key_file_2 = ["全宗号","年度","档案馆代码","正题名","档号","ID","业务类型","男性别","男姓名","男身份证号","男出生日期","男方国籍","男方民族","男方常住户口所在地",
    "男方证件类型","男方身份类型","男方证件印制号","女姓名","女性别","女身份证号","女出生日期","登记日期","登记机关","女方证件类型","女方身份类型","女方国籍","女方民族","女方常住户口所在地",
    "女方证件印制号","承办机关","原结婚登记日期","结婚日期","登记员姓名","是否删除","离婚证备注","结婚证备注","原登记机关","档案号","证字号","其他备注","男方结婚类型","女方结婚类型",
    "男方原婚姻状态","女方原婚姻状态","原登记日期"];

{
    let _temp = sessionStorage.getItem("__fileType");
    switch(_temp){
        case "0":
            key_file_1 =key_file_1_2;
            break;
        case "1":
            key_file_1 =key_file_1_1;
            break;
    }
}


var wb;//读取完成的数据
var rABS = false;//是否将文件读取为二进制字符串
